package net.starwifi.duobao.service.impl;

import net.starwifi.duobao.entity.SmsTemplate;
import net.starwifi.duobao.repository.SmsTemplateRepository;
import net.starwifi.duobao.service.BaseServiceImpl;
import net.starwifi.duobao.service.SmsTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class SmsTemplateServiceImpl extends BaseServiceImpl<SmsTemplate,Long> implements SmsTemplateService {


    @Autowired
    SmsTemplateRepository repository;

    @Override
    @Transactional(readOnly = true)
    @Cacheable("setting")
    public SmsTemplate findByCode(String code) {
        return repository.findByCode(code);
    }


}
